home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / Fresco / build / Unix / config / cf / osfLib.rules < prev    next >
Text File  |  1995-07-12  |  5KB  |  153 lines

  1. XCOMM $XConsortium: osfLib.rules,v 1.9 94/01/18 14:58:49 rws Exp $
  2.  
  3. /*
  4.  * OSF/1 shared library rules
  5.  */
  6.  
  7. #ifndef HasSharedLibraries
  8. #define HasSharedLibraries YES
  9. #endif
  10. #ifndef SeparateSharedCompile
  11. #define SeparateSharedCompile NO
  12. #endif
  13. #ifndef SharedDataSeparation
  14. #define SharedDataSeparation NO
  15. #endif
  16. #ifndef SharedCodeDef
  17. #define SharedCodeDef /**/
  18. #endif
  19. #ifndef SharedLibraryDef
  20. #define SharedLibraryDef /**/
  21. #endif
  22. #ifndef ShLibIncludeFile
  23. #define ShLibIncludeFile <osfLib.tmpl>
  24. #endif
  25. #ifndef SharedLibraryLoadFlags
  26. #if ModernOSF1
  27. #define SharedLibraryLoadFlags -shared -no_archive -rpath $(USRLIBDIR)
  28. #else
  29. #define SharedLibraryLoadFlags -shared -no_archive
  30. #endif
  31. #endif
  32. #ifndef PositionIndependentCFlags
  33. #define PositionIndependentCFlags /**/
  34. #endif
  35.  
  36. /*
  37.  * InstallSharedLibrary - generate rules to install the shared library.
  38.  */
  39. #ifndef InstallSharedLibrary
  40. #define    InstallSharedLibrary(libname,rev,dest)                @@\
  41. install:: Concat(lib,libname.so.rev)                     @@\
  42.     MakeDir($(DESTDIR)dest)                        @@\
  43.     $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
  44.     $(RM) Concat($(DESTDIR)dest/lib,libname.so)            @@\
  45.     $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
  46.  
  47. #endif /* InstallSharedLibrary */
  48.  
  49. /*
  50.  * InstallSharedLibraryData - generate rules to install the shared library data
  51.  */
  52. #ifndef InstallSharedLibraryData
  53. #define    InstallSharedLibraryData(libname,rev,dest)
  54. #endif /* InstallSharedLibraryData */
  55.  
  56. #ifndef PackageName(libname)
  57. #if ModernOSF1
  58. #define PackageName(libname) /**/
  59. #else
  60. #define PackageName(libname) -package libname
  61. #endif
  62. #endif
  63. #if ThreadedX && ModernOSF1
  64. #define BaseShLibReqs -lc_r -lc
  65. #else
  66. #define BaseShLibReqs -lc
  67. #endif
  68.  
  69. /*
  70.  * SharedCplusplusLibraryTarget - generate rules to create a shared C++
  71.  * library; use $(CXXLINK) instead of $(LD) in case the library needs
  72.  * global constructors to be called.
  73.  *
  74.  * Not tested yet; send any bug fixes to fresco@x.org.
  75.  */
  76. #ifndef SharedCplusplusLibraryTarget
  77. #if SeparateSharedCompile
  78. #define SharedCplusplusLibraryTarget(libname,rev,solist,down,up,need_libs) @@\
  79. AllTarget(Concat(lib,libname.so.rev))                    @@\
  80.                                     @@\
  81. Concat(lib,libname.so.rev):  solist                    @@\
  82.     $(RM) $@                            @@\
  83.     $(CXXLINK) -o $@ $(SHLIBLDFLAGS) PackageName($@) -soname $@ solist need_libs BaseShLibReqs @@\
  84.     $(RM) Concat(lib,libname.so)                    @@\
  85.     $(LN) $@ Concat(lib,libname.so)                    @@\
  86.                                     @@\
  87. clean::                                    @@\
  88.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  89. #else
  90. #define SharedCplusplusLibraryTarget(libname,rev,solist,down,up,need_libs)    @@\
  91. AllTarget(Concat(lib,libname.so.rev))                    @@\
  92.                                     @@\
  93. Concat(lib,libname.so.rev):  solist                    @@\
  94.     $(RM) $@~                            @@\
  95.     $(CXXLINK) -o $@~ $(SHLIBLDFLAGS) PackageName($@) -soname $@ solist need_libs BaseShLibReqs @@\
  96.     $(RM) $@                             @@\
  97.     $(MV) $@~ $@                            @@\
  98.     $(RM) Concat(lib,libname.so)                    @@\
  99.     $(LN) $@ Concat(lib,libname.so)                    @@\
  100.                                     @@\
  101. clean::                                    @@\
  102.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  103. #endif /* SeparateSharedCompile */
  104. #endif /* SharedCplusplusLibraryTarget */
  105.  
  106. /*
  107.  * SharedLibraryTarget - generate rules to create a shared library;
  108.  * build it into a different name so that we do not hose people by having
  109.  * the library gone for long periods.
  110.  */
  111. #ifndef SharedLibraryTarget
  112. #if SeparateSharedCompile
  113. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  114. AllTarget(Concat(lib,libname.so.rev))                    @@\
  115.                                     @@\
  116. Concat(lib,libname.so.rev):  solist                    @@\
  117.     $(RM) $@~                            @@\
  118.     (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) PackageName($@) -soname $@ solist $(REQUIREDLIBS) BaseShLibReqs) @@\
  119.     $(RM) $@                             @@\
  120.     $(MV) $@~ $@                            @@\
  121.     $(RM) Concat(lib,libname.so)                    @@\
  122.     $(LN) $@ Concat(lib,libname.so)                    @@\
  123.     LinkBuildLibrary($@)                        @@\
  124.     LinkBuildLibrary(Concat(lib,libname.so))            @@\
  125.                                     @@\
  126. clean::                                    @@\
  127.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  128. #else
  129. #define SharedLibraryTarget(libname,rev,solist,down,up)            @@\
  130. AllTarget(Concat(lib,libname.so.rev))                    @@\
  131.                                     @@\
  132. Concat(lib,libname.so.rev):  solist                    @@\
  133.     $(RM) $@~                            @@\
  134.     $(LD) -o $@~ $(SHLIBLDFLAGS) PackageName($@) -soname $@ solist $(REQUIREDLIBS) BaseShLibReqs @@\
  135.     $(RM) $@                             @@\
  136.     $(MV) $@~ $@                            @@\
  137.     $(RM) Concat(lib,libname.so)                    @@\
  138.     $(LN) $@ Concat(lib,libname.so)                    @@\
  139.     LinkBuildLibrary($@)                        @@\
  140.     LinkBuildLibrary(Concat(lib,libname.so))            @@\
  141.                                     @@\
  142. clean::                                    @@\
  143.     $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
  144. #endif /* SeparateSharedCompile */
  145. #endif /* SharedLibraryTarget */
  146.  
  147. /*
  148.  * SharedLibraryDataTarget - generate rules to create shlib data file;
  149.  */
  150. #ifndef SharedLibraryDataTarget
  151. #define SharedLibraryDataTarget(libname,rev,salist)
  152. #endif /* SharedLibraryTarget */
  153.